<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Document</title>
        <style>



    </style>
</head>
<body>
    <div class="box">
        <div class="item">
            <p>你这瓜保熟嘛</p>
            <p class="only">给你机会你也不中用啊</p>
            <p>你看，你又急</p>
            <p>老师，我太想进步了</p>
        </div>
        
    </div>
    
    <script>
        let only = document.querySelector(".only")
        let item = document.querySelector(".item")
        only.nextElementSibling.style.fontSize = "30px"
        only.previousElementSibling.style.backgroundColor = "red"
        //nextElementSibling  获取调用者的下一个兄弟节点
        // previousElementSibling 获取调用者上一个兄弟节点
        
        // parentNode  获取调用者的父节点
        // console.log(only.parentNode);

        // children  获取调用者的所有子集
        console.log(item.children);
        
        
        
        
        
        </script>
</body>
</html>